
package net.swa.dewei.web.action;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Required;

import net.swa.dewei.beans.entity.LxKehu;
import net.swa.system.service.ICommonService;
import net.swa.system.web.action.AbstractBaseAction;
import net.swa.util.DateUtils;

/**联系客户信息 Action**/
public class LxKehuAction extends AbstractBaseAction
{
    private static final long serialVersionUID = 3791594428014981760L;

    //实体类id
    private Long id;

    //批量删除的id集合
    private Long[] ids;

    //附近没有店面时候 用户留下姓名
    private String lianxiName;

    //附近没有店面时候 用户留下电话
    private String lianxiKefuTel;

    //附近没有店面时候 用户留下地址
    private String lianxiAddr;

    /** 公用方法接口 */
    private ICommonService commonService;

    public String addLianxiKefu() throws Exception
    {
        LxKehu model = new LxKehu();
        model.setName(lianxiName);
        model.setAddr(lianxiAddr);
        model.setTel(lianxiKefuTel);
        model.setCrateDate(DateUtils.getCurrDate(null));
        commonService.commonAdd(model);
        outSuccess();
        return null;
    }

    @Required
	@Resource
    public void setCommonService(ICommonService commonService)
    {
        this.commonService = commonService;
    }

    public Long getId()
    {

        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long[] getIds()
    {
        return ids;
    }

    public void setIds(Long[] ids)
    {
        this.ids = ids;
    }

    public String getLianxiName()
    {
        return lianxiName;
    }

    public void setLianxiName(String lianxiName)
    {
        this.lianxiName = lianxiName;
    }

    public String getLianxiKefuTel()
    {
        return lianxiKefuTel;
    }

    public void setLianxiKefuTel(String lianxiKefuTel)
    {
        this.lianxiKefuTel = lianxiKefuTel;
    }

    public String getLianxiAddr()
    {
        return lianxiAddr;
    }

    public void setLianxiAddr(String lianxiAddr)
    {
        this.lianxiAddr = lianxiAddr;
    }

    public ICommonService getCommonService()
    {
        return commonService;
    }

}
